<template>
	<div>
		<h2>TestEmit</h2>
		<button @click="hanldeEmit">点击传参funtion版</button>
		<button
			@click="
				$emit('handleParams', {
					name: '李四',
					age: 20
				})
			"
		>
			点击直接传参
		</button>
	</div>
</template>
<script lang="ts" setup>
const emit = defineEmits(["handleParams"]);
function hanldeEmit() {
	emit("handleParams", {
		name: "李四",
		age: 20
	});
}
</script>
